unsigned char colormap_promax[256][3] = {
	{0, 0, 0},
	{2, 2, 2},
	{4, 4, 4},
	{6, 6, 6},
	{8, 8, 8},
	{10, 10, 10},
	{12, 12, 12},
	{14, 14, 14},
	{16, 16, 16},
	{18, 18, 18},
	{20, 20, 20},
	{22, 22, 22},
	{24, 24, 24},
	{26, 26, 26},
	{28, 28, 28},
	{30, 30, 30},
	{32, 32, 32},
	{34, 34, 34},
	{36, 36, 36},
	{38, 38, 38},
	{40, 40, 40},
	{42, 42, 42},
	{44, 44, 44},
	{46, 46, 46},
	{48, 48, 48},
	{50, 50, 50},
	{52, 52, 52},
	{54, 54, 54},
	{56, 56, 56},
	{58, 58, 58},
	{60, 60, 60},
	{62, 62, 62},
	{64, 64, 64},
	{66, 66, 66},
	{68, 68, 68},
	{70, 70, 70},
	{72, 72, 72},
	{74, 74, 74},
	{76, 76, 76},
	{78, 78, 78},
	{80, 80, 80},
	{82, 82, 82},
	{84, 84, 84},
	{86, 86, 86},
	{88, 88, 88},
	{90, 90, 90},
	{92, 92, 92},
	{94, 94, 94},
	{96, 96, 96},
	{98, 98, 98},
	{100, 100, 100},
	{102, 102, 102},
	{104, 104, 104},
	{106, 106, 106},
	{108, 108, 108},
	{110, 110, 110},
	{112, 112, 112},
	{114, 114, 114},
	{116, 116, 116},
	{118, 118, 118},
	{120, 120, 120},
	{122, 122, 122},
	{124, 124, 124},
	{126, 126, 126},
	{128, 128, 128},
	{130, 130, 130},
	{132, 132, 132},
	{134, 134, 134},
	{136, 136, 136},
	{138, 138, 138},
	{140, 140, 140},
	{142, 142, 142},
	{144, 144, 144},
	{146, 146, 146},
	{148, 148, 148},
	{150, 150, 150},
	{152, 152, 152},
	{154, 154, 154},
	{156, 156, 156},
	{158, 158, 158},
	{160, 160, 160},
	{162, 162, 162},
	{164, 164, 164},
	{166, 166, 166},
	{168, 168, 168},
	{170, 170, 170},
	{172, 172, 172},
	{174, 174, 174},
	{176, 176, 176},
	{178, 178, 178},
	{180, 180, 180},
	{182, 182, 182},
	{184, 184, 184},
	{186, 186, 186},
	{188, 188, 188},
	{190, 190, 190},
	{192, 192, 192},
	{194, 194, 194},
	{196, 196, 196},
	{198, 198, 198},
	{200, 200, 200},
	{202, 202, 202},
	{204, 204, 204},
	{206, 206, 206},
	{208, 208, 208},
	{210, 210, 210},
	{212, 212, 212},
	{214, 214, 214},
	{216, 216, 216},
	{218, 218, 218},
	{220, 220, 220},
	{222, 222, 222},
	{224, 224, 224},
	{226, 226, 226},
	{228, 228, 228},
	{230, 230, 230},
	{232, 232, 232},
	{234, 234, 234},
	{236, 236, 236},
	{238, 238, 238},
	{240, 240, 240},
	{242, 242, 242},
	{244, 244, 244},
	{246, 246, 246},
	{248, 248, 248},
	{250, 250, 250},
	{252, 252, 252},
	{255, 255, 255},
	{255, 255, 255},
	{255, 252, 250},
	{255, 250, 246},
	{255, 248, 242},
	{255, 246, 238},
	{255, 244, 234},
	{255, 242, 230},
	{255, 240, 226},
	{255, 238, 222},
	{255, 236, 218},
	{255, 234, 214},
	{255, 232, 210},
	{255, 230, 206},
	{255, 228, 202},
	{255, 226, 198},
	{255, 224, 194},
	{255, 222, 190},
	{255, 220, 186},
	{255, 218, 182},
	{255, 216, 178},
	{255, 214, 174},
	{255, 212, 170},
	{255, 210, 165},
	{255, 208, 161},
	{255, 206, 157},
	{255, 204, 153},
	{255, 202, 149},
	{255, 200, 145},
	{255, 198, 141},
	{255, 196, 137},
	{255, 194, 133},
	{255, 192, 129},
	{255, 190, 125},
	{255, 188, 121},
	{255, 186, 117},
	{255, 184, 113},
	{255, 182, 109},
	{255, 180, 105},
	{255, 178, 101},
	{255, 176, 97},
	{255, 174, 93},
	{255, 172, 89},
	{255, 170, 85},
	{255, 168, 80},
	{255, 166, 76},
	{255, 164, 72},
	{255, 162, 68},
	{255, 160, 64},
	{255, 158, 60},
	{255, 156, 56},
	{255, 154, 52},
	{255, 152, 48},
	{255, 150, 44},
	{255, 148, 40},
	{255, 146, 36},
	{255, 144, 32},
	{255, 142, 28},
	{255, 140, 24},
	{255, 138, 20},
	{255, 136, 16},
	{255, 134, 12},
	{255, 132, 8},
	{255, 130, 4},
	{255, 128, 0},
	{255, 126, 0},
	{255, 124, 0},
	{255, 122, 0},
	{255, 120, 0},
	{255, 118, 0},
	{255, 116, 0},
	{255, 114, 0},
	{255, 112, 0},
	{255, 110, 0},
	{255, 108, 0},
	{255, 106, 0},
	{255, 104, 0},
	{255, 102, 0},
	{255, 100, 0},
	{255, 98, 0},
	{255, 96, 0},
	{255, 94, 0},
	{255, 92, 0},
	{255, 90, 0},
	{255, 88, 0},
	{255, 86, 0},
	{255, 84, 0},
	{255, 82, 0},
	{255, 80, 0},
	{255, 78, 0},
	{255, 76, 0},
	{255, 74, 0},
	{255, 72, 0},
	{255, 70, 0},
	{255, 68, 0},
	{255, 66, 0},
	{255, 64, 0},
	{255, 62, 0},
	{255, 60, 0},
	{255, 58, 0},
	{255, 56, 0},
	{255, 54, 0},
	{255, 52, 0},
	{255, 50, 0},
	{255, 48, 0},
	{255, 46, 0},
	{255, 44, 0},
	{255, 42, 0},
	{255, 40, 0},
	{255, 38, 0},
	{255, 36, 0},
	{255, 34, 0},
	{255, 32, 0},
	{255, 30, 0},
	{255, 28, 0},
	{255, 26, 0},
	{255, 24, 0},
	{255, 22, 0},
	{255, 20, 0},
	{255, 18, 0},
	{255, 16, 0},
	{255, 14, 0},
	{255, 12, 0},
	{255, 10, 0},
	{255, 8, 0},
	{255, 6, 0},
	{255, 4, 0},
	{255, 2, 0},
	{255, 0, 0},
};

unsigned char colormap_viridis[256][3] = {
	{68, 1, 84},
	{68, 2, 86},
	{69, 4, 87},
	{69, 5, 89},
	{70, 7, 90},
	{70, 8, 92},
	{70, 10, 93},
	{70, 11, 94},
	{71, 13, 96},
	{71, 14, 97},
	{71, 16, 99},
	{71, 17, 100},
	{71, 19, 101},
	{72, 20, 103},
	{72, 22, 104},
	{72, 23, 105},
	{72, 24, 106},
	{72, 26, 108},
	{72, 27, 109},
	{72, 28, 110},
	{72, 29, 111},
	{72, 31, 112},
	{72, 32, 113},
	{72, 33, 115},
	{72, 35, 116},
	{72, 36, 117},
	{72, 37, 118},
	{72, 38, 119},
	{72, 40, 120},
	{72, 41, 121},
	{71, 42, 122},
	{71, 44, 122},
	{71, 45, 123},
	{71, 46, 124},
	{71, 47, 125},
	{70, 48, 126},
	{70, 50, 126},
	{70, 51, 127},
	{70, 52, 128},
	{69, 53, 129},
	{69, 55, 129},
	{69, 56, 130},
	{68, 57, 131},
	{68, 58, 131},
	{68, 59, 132},
	{67, 61, 132},
	{67, 62, 133},
	{66, 63, 133},
	{66, 64, 134},
	{66, 65, 134},
	{65, 66, 135},
	{65, 68, 135},
	{64, 69, 136},
	{64, 70, 136},
	{63, 71, 136},
	{63, 72, 137},
	{62, 73, 137},
	{62, 74, 137},
	{62, 76, 138},
	{61, 77, 138},
	{61, 78, 138},
	{60, 79, 138},
	{60, 80, 139},
	{59, 81, 139},
	{59, 82, 139},
	{58, 83, 139},
	{58, 84, 140},
	{57, 85, 140},
	{57, 86, 140},
	{56, 88, 140},
	{56, 89, 140},
	{55, 90, 140},
	{55, 91, 141},
	{54, 92, 141},
	{54, 93, 141},
	{53, 94, 141},
	{53, 95, 141},
	{52, 96, 141},
	{52, 97, 141},
	{51, 98, 141},
	{51, 99, 141},
	{50, 100, 142},
	{50, 101, 142},
	{49, 102, 142},
	{49, 103, 142},
	{49, 104, 142},
	{48, 105, 142},
	{48, 106, 142},
	{47, 107, 142},
	{47, 108, 142},
	{46, 109, 142},
	{46, 110, 142},
	{46, 111, 142},
	{45, 112, 142},
	{45, 113, 142},
	{44, 113, 142},
	{44, 114, 142},
	{44, 115, 142},
	{43, 116, 142},
	{43, 117, 142},
	{42, 118, 142},
	{42, 119, 142},
	{42, 120, 142},
	{41, 121, 142},
	{41, 122, 142},
	{41, 123, 142},
	{40, 124, 142},
	{40, 125, 142},
	{39, 126, 142},
	{39, 127, 142},
	{39, 128, 142},
	{38, 129, 142},
	{38, 130, 142},
	{38, 130, 142},
	{37, 131, 142},
	{37, 132, 142},
	{37, 133, 142},
	{36, 134, 142},
	{36, 135, 142},
	{35, 136, 142},
	{35, 137, 142},
	{35, 138, 141},
	{34, 139, 141},
	{34, 140, 141},
	{34, 141, 141},
	{33, 142, 141},
	{33, 143, 141},
	{33, 144, 141},
	{33, 145, 140},
	{32, 146, 140},
	{32, 146, 140},
	{32, 147, 140},
	{31, 148, 140},
	{31, 149, 139},
	{31, 150, 139},
	{31, 151, 139},
	{31, 152, 139},
	{31, 153, 138},
	{31, 154, 138},
	{30, 155, 138},
	{30, 156, 137},
	{30, 157, 137},
	{31, 158, 137},
	{31, 159, 136},
	{31, 160, 136},
	{31, 161, 136},
	{31, 161, 135},
	{31, 162, 135},
	{32, 163, 134},
	{32, 164, 134},
	{33, 165, 133},
	{33, 166, 133},
	{34, 167, 133},
	{34, 168, 132},
	{35, 169, 131},
	{36, 170, 131},
	{37, 171, 130},
	{37, 172, 130},
	{38, 173, 129},
	{39, 173, 129},
	{40, 174, 128},
	{41, 175, 127},
	{42, 176, 127},
	{44, 177, 126},
	{45, 178, 125},
	{46, 179, 124},
	{47, 180, 124},
	{49, 181, 123},
	{50, 182, 122},
	{52, 182, 121},
	{53, 183, 121},
	{55, 184, 120},
	{56, 185, 119},
	{58, 186, 118},
	{59, 187, 117},
	{61, 188, 116},
	{63, 188, 115},
	{64, 189, 114},
	{66, 190, 113},
	{68, 191, 112},
	{70, 192, 111},
	{72, 193, 110},
	{74, 193, 109},
	{76, 194, 108},
	{78, 195, 107},
	{80, 196, 106},
	{82, 197, 105},
	{84, 197, 104},
	{86, 198, 103},
	{88, 199, 101},
	{90, 200, 100},
	{92, 200, 99},
	{94, 201, 98},
	{96, 202, 96},
	{99, 203, 95},
	{101, 203, 94},
	{103, 204, 92},
	{105, 205, 91},
	{108, 205, 90},
	{110, 206, 88},
	{112, 207, 87},
	{115, 208, 86},
	{117, 208, 84},
	{119, 209, 83},
	{122, 209, 81},
	{124, 210, 80},
	{127, 211, 78},
	{129, 211, 77},
	{132, 212, 75},
	{134, 213, 73},
	{137, 213, 72},
	{139, 214, 70},
	{142, 214, 69},
	{144, 215, 67},
	{147, 215, 65},
	{149, 216, 64},
	{152, 216, 62},
	{155, 217, 60},
	{157, 217, 59},
	{160, 218, 57},
	{162, 218, 55},
	{165, 219, 54},
	{168, 219, 52},
	{170, 220, 50},
	{173, 220, 48},
	{176, 221, 47},
	{178, 221, 45},
	{181, 222, 43},
	{184, 222, 41},
	{186, 222, 40},
	{189, 223, 38},
	{192, 223, 37},
	{194, 223, 35},
	{197, 224, 33},
	{200, 224, 32},
	{202, 225, 31},
	{205, 225, 29},
	{208, 225, 28},
	{210, 226, 27},
	{213, 226, 26},
	{216, 226, 25},
	{218, 227, 25},
	{221, 227, 24},
	{223, 227, 24},
	{226, 228, 24},
	{229, 228, 25},
	{231, 228, 25},
	{234, 229, 26},
	{236, 229, 27},
	{239, 229, 28},
	{241, 229, 29},
	{244, 230, 30},
	{246, 230, 32},
	{248, 230, 33},
	{251, 231, 35},
	{253, 231, 37}
};